<%@ page import="java.util.Date" %>
<%--
  Created by IntelliJ IDEA.
  User: wangxiaoping
  Date: 2024/8/24
  Time: 14:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title>$Title$</title>
  </head>
  <body>
  <h1>当前有<span><%=this.getServletConfig().getServletContext().getAttribute("OnlineCount")%>个用户在线！！</span></h1>
<%--<%= new java.util.Date()%>--%>
<%= new Date()%>
<hr/>
  <%
    int sum=0;
    for(int i=0;i<=100;i++){
      sum+=i;
    }
    out.write("<h1>sum="+sum+"</h1>");
    out.write("<hr/>");
  for(int i=1;i<=5;i++){
    out.write("<h"+i+">helloword</h"+i+"><br/>");
  }%>
  <hr/>
  <%
    int x = 10;
    out.println(x);
  %>
  <p>上面是的输入由jsp片段生成的</p>
  <hr/>
  <%
   int y = 20;
   out.println(y);
  %>
  <hr/>
  <%
    for(int i=1;i<=6;i++){%>
      Hello World <%=i%><br/>

<%
  }
  %>

  <%!
    static {
      System.out.println("servLetLoading....");
    }
    private int globalvar=0;
    public void kuang(){
      System.out.println("厉害了！");
    }

  %>

  </body>
</html>
